package com.abe.libquick.utils;

import com.abe.libcore.utils.SPUtils;
import com.abe.libcore.utils.context.ContextUtils;

public class SpQuickHelper {
    private static final String SP_BASE_TAG = "com.abe.libquick";
    private static final String SP_DATA_FONT_SCALE = "fontScale";
    private static SPUtils spUtils;

    protected static SPUtils sp() {
        if (spUtils == null) {
            spUtils = new SPUtils(ContextUtils.Companion.getContext(), SP_BASE_TAG);
        }
        return spUtils;
    }

    public static float fontScale() {
        return sp().getFloat(SP_DATA_FONT_SCALE, 1.0f);
    }

    public static void fontScale(float scale) {
        sp().putFloat(SP_DATA_FONT_SCALE, scale);
    }
}